package org.dromara.common.mongo;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.MongoId;

import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ChatMessage {

    public static final Integer TYPE_TXT = 0;
    public static final Integer TYPE_IMAGE = 1;


    @MongoId
    private String id;

    @Schema(description = "用户ID")
    private Long userId;

    @Schema(description = "消息ID")
    private String messageId;

    @Schema(description = "会话ID")
    private String sessionId;

    @Schema(description = "消息时间")
    private LocalDateTime time;

    @Schema(description = "请求应答内容")
    private String content;

    @Schema(description = "图片内容，文生图模式使用, 图生文类型使用")
    private String image;

    @Schema(description = "true： 发请请求， false: 模型回应")
    private Boolean ask;

    @Schema(description = "模型消息的role")
    private String role;

    @Schema(description = "消息类型 0 文字消息  1图片")
    private Integer type;

    @Schema(description = "应答的模型名称")
    private String modelName;

    @Schema(description = "应答的模型Icon")
    private String modelIcon;

    @Schema(description = "文件名称")
    private String fileName;

    @Schema(description = "服务器文件ID")
    private String fileId;

    @Schema(description = "文件大小")
    private Long fileSize;

}
